package com.bestcem.xm.common.core.oss.enums;

import lombok.Getter;

@Getter
public enum OssPathEnum {
    /**
     * 奖励模块目录
     */
    AWARD("award", "award/ds/"),

    /**
     * 联系人模块目录
     */
    MEMBER("member", "member/ds/"),

    /**
     * 文本分析模块目录
     */
    TXTANLS("txtanls", "txtanls/ds/"),

    /**
     * 运营平台模块目录
     */
    OM("om", "om/ds/"),

    /**
     * 工单/预警模块目录
     */
    TICKET("ticket", "ticket/ds/"),

    /**
     * 用户模块目录
     */
    USER("user", "user/ds/"),

    /**
     * 奖励模块临时目录
     */
    TEMP_AWARD("temp_award", "temp/award/ds/"),

    /**
     * 联系人模块临时目录
     */
    TEMP_MEMBER("temp_member", "temp/member/ds/"),

    /**
     * 文本分析模块临时目录
     */
    TEMP_TXTANLS("temp_txtanls", "temp/txtanls/ds/"),

    /**
     * 运营平台模块临时目录
     */
    TEMP_OM("temp_om", "temp/om/ds/"),
    /**
     * 工单/预警模块临时目录
     */
    TEMP_TICKET("temp_ticket", "temp/ticket/ds/"),

    /**
     * qdes临时目录
     */
    TEMP_QDES("temp_qdes", "temp/qdes/ds/"),

    /**
     * others临时目录
     */
    TEMP_OTHERS("temp_others", "temp/others/ds/"),

    /**
     * qdes上传
     */
    QDES("qdes", "qdes/"),

    OTHERS("others", "others/"),

    DELIVER("deliver", "deliver/"),

    SURVEY("survey", "survey/"),

    /**
     * deliver临时目录
     */
    TEMP_DELIVER("temp_deliver", "temp/deliver/ds/"),

    /**
     * bi模块
     */
    BI("bi", "bi/"),

    /**
     * bi 自定义图表模块
     */
    BI_CUSTOM("bi_custom", "bi/custom/"),

    /**
     * bi 数据源上传模块
     */
    BI_DATASOURCE_UPLOAD("bi_datasource_upload", "bi/datasource/upload/"),

    /**
     * bi模块临时目录
     */
    TEMP_BI("temp_bi", "temp/bi/ds/"),

    /**
     * 二维码上传
     */
    QRCODE("qrcode", "qrcode/"),

    /**
     * survey临时目录
     */
    TEMP_SURVEY("temp_deliver", "temp/survey/ds/");

    /**
     * 模块名称
     */
    private final String name;

    /**
     * 文件目录
     */
    private final String path;

    OssPathEnum(String name, String path) {
        this.name = name;
        this.path = path;
    }

    /**
     * 根据路径获取枚举对象
     *
     * @param path 模块文件路径
     * @return 枚举对象 OssPathEnum
     */
    public static OssPathEnum getInstance(String path) {
        for (OssPathEnum value : values()) {
            if (value.getPath().equals(path)) {
                return value;
            }
        }
        return null;
    }

}
